package com.hd.entity.job;

import java.io.Serializable;
import java.util.ArrayList;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name="quartz_schedule_job")
public class QuartzScheduleJob implements Serializable {
	
	private static final long serialVersionUID = 7328755297554740400L;
	  /**
     * 任务名称
     */
	@Id
    private String jobName;
    /**
     * 任务分组
     */
    private String jobGroup;
    /**
     * 触发器名称（默认和任务名称相同）
     */
    private String triggerName;
    /**
     * 触发器分组（默认和任务分组相同）
     */
    private String triggerGroup;
    /**
     * 任务需要调用的是哪个类的类名
     */
    private String className;
    /**
     * 任务需要调用的是哪个类的方法名
     */
    private String methodName;
    /**
     * 方法所需参数数组
     */
    @Transient
    private ArrayList paramArray;
    @Column(name="params",columnDefinition = "TEXT")
    private String params;
    /**
     * 任务运行时间表达式
     */
    private String cron;
    /**
     * 任务运行时间(特指只运行一次的任务)
     */
    private String runDate;
    /**
     * 任务描述
     */
    @Column(name="description")
    private String desc;
    /**
     * 任务状态：
     * 1-等待执行
     * 2-暂停
     * 0-关闭
     */
    private Integer status;
	public String getJobName() {
		return jobName;
	}
	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
	public String getJobGroup() {
		return jobGroup;
	}
	public void setJobGroup(String jobGroup) {
		this.jobGroup = jobGroup;
	}
	public String getTriggerName() {
		return triggerName;
	}
	public void setTriggerName(String triggerName) {
		this.triggerName = triggerName;
	}
	public String getTriggerGroup() {
		return triggerGroup;
	}
	public void setTriggerGroup(String triggerGroup) {
		this.triggerGroup = triggerGroup;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getMethodName() {
		return methodName;
	}
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	public ArrayList getParamArray() {
		return paramArray;
	}
	public void setParamArray(ArrayList paramArray) {
		this.paramArray = paramArray;
	}
	public String getCron() {
		return cron;
	}
	public void setCron(String cron) {
		this.cron = cron;
	}
	public String getRunDate() {
		return runDate;
	}
	public void setRunDate(String runDate) {
		this.runDate = runDate;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	public String getParams() {
		return params;
	}
	public void setParams(String params) {
		this.params = params;
	}
	public QuartzScheduleJob(String jobName, String jobGroup, String triggerName, String triggerGroup, String className,
			String methodName, ArrayList paramArray, String cron, String runDate, String desc) {
		super();
		this.jobName = jobName;
		this.jobGroup = jobGroup;
		this.triggerName = triggerName;
		this.triggerGroup = triggerGroup;
		this.className = className;
		this.methodName = methodName;
		this.paramArray = paramArray;
		this.cron = cron;
		this.runDate = runDate;
		this.desc = desc;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public QuartzScheduleJob() {
		super();
	}
    

}
